#pragma once

#include <list>
#include <map>
#include "EnginePointer.h"
#include "EngineObject.h"

class IEngineComponent;

class IEngineComponentCollection : public EngineObject, public list<EnginePointer<IEngineComponent>>
{
public:
	IEngineComponentCollection(void);
	~IEngineComponentCollection(void);

	void push_back(const EnginePointer<IEngineComponent>& component);
	void push_front(const EnginePointer<IEngineComponent>& component);

	EnginePointer<IEngineComponent> getComponentFromId(long long int id);

	AUTO_SIZE;
private:
	map<long long int, EnginePointer<IEngineComponent>> idMap;
};
